﻿using System.ComponentModel;

namespace Needle.Core.Lifetime
{
    /// <summary></summary>
    public interface ILifetimeManager : IComponent
    {
        /// <summary></summary>
        void Register(InstanceId instanceId, object instance);
        /// <summary></summary>
        void Register(InstanceId instanceId, object instance, ITrackingPolicy trackingPolicy);
        /// <summary></summary>
        void Unregister(InstanceId instanceId);
        /// <summary></summary>
        void SetTrackingPolicy(InstanceId instanceId, ITrackingPolicy trackingPolicy);
        /// <summary></summary>
        ITrackingPolicy GetTrackingPolicy(InstanceId instanceId);
        /// <summary></summary>
        object GetInstance(InstanceId instanceId);
    }
}
